// 所有关于视频模块的接口
import request from '@/utils/request'

// 上传视频接口
// data----要上传的视频数据包 用formdata传递的数据
export function uploadVideo (data) {
  return request({
    url: "/VueHandler/UpLoadVideoHandler",
    method: 'post',
    headers: {// 设置请求头 为formdata格式 
      "Content-Type": "multipart/form-data"
    },
    data
  })
}
// 添加视频接口
export function addVideoApi (data) {
  return request({
    url: "/VueHandler/VideoHandler?action=add",
    method: "post",
    data
  })
}
// 获取视频列表接口
export function getVideoListApi (data) {
  return request({
    url: "/VueHandler/VideoHandler?action=showlist",
    method: "post",
    data
  })
}
// 删除视频接口
export function deleteVideoApi (ID) {
  return request({
    url: "/VueHandler/VideoHandler?action=delete",
    method: "get",
    params: { ID }

  })
}
// 编辑视频接口
export function updateVideoApi (data) {
  return request({
    url: "/VueHandler/VideoHandler?action=update",
    method: "post",
    data
  })
}